<!--  -->
<template>
  <div id="app">
    <!-- <div class="tag">
      <div class="wrap clear">
        <span
          class="fl"
          v-for="(item, index) in menus"
          :key="index"
          :class="{ cur: curNav == item.name }"
          @click="toRouter(item)"
          >{{ item.txt }}</span
        >
      </div>
    </div> -->
    <keep-alive>
      <router-view :key="$route.name"></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  data() {
    return {
      curNav: "nszc",
      menus: [
        {
          txt: "牛散增持",
          name: "nszc",
        },
        {
          txt: "机构增持",
          name: "jgzc",
        },
        {
          txt: "高管增持",
          name: "ggzc",
        },
        {
          txt: "大股东增持",
          name: "dgdzc",
        },
        {
          txt: "股东人数",
          name: "gdrs",
        },
        {
          txt: "关注",
          name: "concern",
        },
      ],
    };
  },

  components: {},

  computed: {},

  mounted() {},

  methods: {
    toRouter(row) {
      const { name } = this.$route;
      if (name == row.name) return;
      this.$router.push({ name: row.name });
      this.curNav = row.name;
    },
  },
};
</script>
<style lang="scss" scoped>
.tag {
  background: #28282e;
  border: 1px solid #26262a;
  height: 30px;
  line-height: 30px;
  span {
    width: 100px;
    text-align: center;
    color: #bcbfc4;
    font-size: 15px;
    border-right: 1px solid #000000;
    cursor: pointer;
    &:first-child {
      border-left: 1px solid #000000;
    }
    &.cur {
      background: #364a7c;
      color: #fff;
    }
  }
}
</style>
